﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KaoQin.RFIDLIB
{
    interface ICardFun:IDisposable
    {
        /// <summary>
        /// 让设备发出声响
        /// </summary>
        /// <param name="xms"></param>
        /// <returns></returns>
        int DoBeed(int xms);

        /// <summary>
        /// 获取设备编号
        /// </summary>
        /// <param name="deviceNumber"></param>
        /// <returns></returns>
        int GetDeviceNumber(out string deviceNumber);

        /// <summary>
        /// 读取用户存储区数据
        /// </summary>
        /// <param name="key"></param>
        /// <param name="userData"></param>
        /// <returns></returns>
        int GetUserDatas(string key, out string userData);

        /// <summary>
        /// 写入用户存储区数据
        /// </summary>
        /// <param name="key"></param>
        /// <param name="userData"></param>
        /// <returns></returns>
        int WriteUserDatas(string key,string userData);

        /// <summary>
        /// 读取系统存储区数据
        /// </summary>
        /// <param name="key"></param>
        /// <param name="sysData"></param>
        /// <returns></returns>
        int GetSysDatas(string key,out string sysData);

        /// <summary>
        /// 写入系统存储区数据
        /// </summary>
        /// <param name="key"></param>
        /// <param name="cardNum"></param>
        /// <param name="sysData"></param>
        /// <returns></returns>
        int WriteSysDatas(string key, string sysData);

        /// <summary>
        /// 修改IC卡密码
        /// </summary>
        /// <param name="oldKey"></param>
        /// <param name="newKey"></param>
        /// <returns></returns>
        int ChangePass(string oldKey, string newKey);

        /// <summary>
        /// 取得卡序列号
        /// </summary>
        /// <param name="serial"></param>
        /// <returns></returns>
        int GetCardSerial(out string serial);

        /// <summary>
        /// 写入卡唯一ID
        /// </summary>
        /// <param name="key"></param>
        /// <param name="uniqueID"></param>
        /// <returns></returns>
        int WriteCardUniqueID(string key, Guid uniqueID);

        /// <summary>
        /// 读取卡唯一ID
        /// </summary>
        /// <param name="key"></param>
        /// <param name="uniqueID"></param>
        /// <returns></returns>
        int GetCardUniqueID(string key, out Guid uniqueID);
    }
}
